Skip to content

Conversation

@waldyrious
Copy link
Member

Checklist

  • The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.
  • The page description(s) have links to documentation or a homepage.
  • The page(s) follow the content guidelines.
  • The page(s) follow the style guide.
  • The PR contains at most 5 new pages.
  • The PR is authored by me, or has been human-reviewed if it was created with AI or machine translation software.
  • The PR title conforms to the recommended templates.
  • Version of the command being documented (if known):

Reference issue: #

@github-actions github-actions bot added page edit Changes to an existing page(s). review needed Prioritized PRs marked for reviews from maintainers. labels Nov 1, 2025
@kbdharun kbdharun added the hacktoberfest-accepted PRs that were opened for Hacktoberfest, but may not actually get merged until November. label Nov 1, 2025
Copy link
Member

@sbrl sbrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! wording improvement is good, yesyes 🌟

`csplit {{path/to/file}} 5 {{[-f|--prefix]}} {{prefix}}`

- Split a file at a line matching a `regex`:
- Split a file at the first line matching a `regex`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before or after the detected line?

Copy link
Member Author

@waldyrious waldyrious Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The split is before the matching line, good point. But this clarification might warrant also updating the other examples too. I'll look into that later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked the whole page to clarify where the splits occur. Please re-review and let me know if this looks good to you. (@sbrl you may want to reassess too 🙂)

@sebastiaanspeck sebastiaanspeck changed the title csplit: Clarify how the regex option works csplit: clarify how the regex option works Nov 4, 2025
@waldyrious waldyrious force-pushed the csplit-regex-clarify branch from e18e26d to 8fd47fe Compare November 5, 2025 23:59
@Managor
Copy link
Member

Managor commented Nov 6, 2025

Please don't force push

@waldyrious
Copy link
Member Author

Please don't force push

Are we not supposed to rebase the branch when it gets outdated? What if there are conflicts?

@Managor
Copy link
Member

Managor commented Nov 6, 2025

The github UI will warn in the case of conflicts. They are a non-issue.
We would like to preserve commit history so that it's clear what changes were made after what comments

@waldyrious
Copy link
Member Author

Right, that's a good point. It's a pity that we still have to rely on untidy commit histories to avoid breaking the code review experience, which should be the responsibility of the forge, i.e. GitHub. Hopefully novel approaches like GitButler's patch-based code review system and stable change IDs (like those used by jj) will catch on, so that we can have our cake and eat it too (i.e. have clean commit histories but also be able to follow the evolution of a patchset during review).

For the time being, I'll refrain from force-pushing except to resolve conflicts.

@Managor
Copy link
Member

Managor commented Nov 6, 2025

Every PR gets squshed before merge. An untidy commit history is a non-issue.

> More information: <https://www.gnu.org/software/coreutils/manual/html_node/csplit-invocation.html>.
- Split a file at lines 5 and 23:
- Split a file in two parts, starting the second one at line 10:
Copy link
Member

@Managor Managor Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still sort of ambiguous. Are you starting it before or after line 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs that were opened for Hacktoberfest, but may not actually get merged until November. page edit Changes to an existing page(s). review needed Prioritized PRs marked for reviews from maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants